﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StuffNET.Math;
using StuffNET.Physics;

namespace UnitTests
{
    public class TestCollisionObject : ICollidable
    {
        private List<Coordinate> corners = new List<Coordinate>();


        public Collision[] Collisions { get; set; }

        public Coordinate[] Boundary
        {
            get { return corners.ToArray(); }
            private set { corners = value.ToList(); }
        }



        public TestCollisionObject(params Coordinate[] cn)
        {
            corners.AddRange(cn);
        }

        public void Rotate(Coordinate pivot, double angle)
        {
            Boundary = Coordinate.RotateCoordinatesAroundPivot(Boundary, pivot, angle);
        }

        public void Offset(double x, double y)
        {
            for (int i = 0; i < corners.Count; i++)
            {
                corners[i].X += x;
                corners[i].Y += y;
            }
        }

    }
}
